package com.hl.service;

import com.hl.mapper.CourseMapper;
import com.hl.pojo.Course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseServiceImpl implements CourseService{
    @Autowired
    private CourseMapper mapper;
    @Override
    public Integer addCourse(Course course) {
        return mapper.addCourse(course);
    }

    @Override
    public Integer updateCourse(Course course) {
        return mapper.updateCourse(course);
    }

    @Override
    public Integer deleteCourse(Integer id) {
        return mapper.deleteCourse(id);
    }

    @Override
    public Course findCourseById(Integer id) {
        return mapper.findCourseById(id);
    }

    @Override
    public List<Course> findAllCourses() {
        return mapper.findAllCourses();
    }

    @Override
    public List<Course> findByCourseName(String courseName) {
        return mapper.findByCourseName(courseName);
    }


}
